// pages/linpai/user-order.js
Page({

    /**
     * 页面的初始数据
     */
    data: {

    },

    /**
     * 生命周期函数--监听页面加载
     */
    onLoad: function (options) {

       this.loadData();
    },

    loadData() {
        let {
            list = [], page = 1, total = 2,
            status,
        } = this.data;
        if (page >= total) return;
        wx.showLoading({
            title: '加载中...',
        })
        const ps = {
            page,
            size: 6,
        };
        const str = Object.keys(ps).map(k => {
            return k + '=' + ps[k];
        }).join('&');
        getApp().http.post(`rest/plate-number-order/list-member?`+str).then(res => {
            list.push(...res.content.records);
            page++;
            this.setData({
                list,
                page,
                total: res.content.pages
            });
            wx.hideLoading();
        })
    },
    onReachBottom() {
        this.loadData();
    },
})